<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link href="assets/ico/bioroad-logo.ico" rel="shortcut icon">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap-collapse.js"></script>
<script type="text/javascript" src="js/bootstrap-tab.js"></script>


<script type="text/javascript" src="js/bootstrap-popover.js"></script>
<script type="text/javascript" src="js/bootstrap-scrollspy.js"></script>

<style type="text/css">
body {
	background-image: url("");
	min-width: 260px;
}

#containers {
	margin-top: 60px;
	margin-left: 30%;
	margin-right: 20%;
	float: left;
}

#container {
	position: absolute;
	top: 0px;
	width: 700px;
	margin-top: 10px;
	margin-left: 360px;
}

form {
	font-size: 16px;
	margin-bottom: 0px;
}

.add-on {
	font-size: 14px;
}

.form-actions {
	margin-right: 52%;
}

#tishi {
	font-size: 10px;
}

.diseaseCategorySn {
	cursor: pointer;
}

.diseaseTypeSn {
	cursor: pointer;
}

.leftDiv {
	padding-left: 10px;
	margin-left: 0px;
	font-family: 方正静蕾简体;
	background-color: #FDFDFD;
	background-image: url("image/frenchstucco.png");
	border-radius: 0px 160px 6px 0px;
	width: 260px;
	height: auto;
}
#timer{
	margin-top: -120px;
}
</style>
</head>

<body>
	<div id="containers">
		<%@ include file="include/topbar.jsp"%>

		<%--<a href="toinsert.action">aaaaaaaaaa</a>
		--%>

	</div>
	
	<%----------------------------------------------------------------------------------------------------------------------------%>
	<div class="leftDiv">
		<h2 style="margin-top: 12px;">病例的分类</h2>
		<br> <span><a id="allfolds" href="javascript:void(0)"
			onclick="allFold()">-</a> 全部折叠</span> <br />
		<c:forEach var="diseaseCategory" items="${diseaseCategoryList }">

			<span class="diseaseCategorySn" id="stackFirst${diseaseCategory.sn}">
				+<input type="hidden" name="diseaseCategorySnHidden"
				value="${diseaseCategory.sn }" /></span><i class="icon-list"></i>${diseaseCategory.name}
		<br />

			<div class="typeanddisease" id="stackTwo${diseaseCategory.sn}"
				style="display: none">

				<c:forEach var="diseaseType" items="${diseaseCategory.diseaseTypes}">
&nbsp;&nbsp;
				<%--第二层的东西------------------------- --%>
					<span class="diseaseTypeSn" id="stackSecound${diseaseType.sn}">
						+<input type="hidden" name="diseaseTypeSnHidden"
						value="${diseaseType.sn}" /></span>${diseaseType.name}
				<br />
					<div class="diseaseType" id="stackThree${diseaseType.sn}"
						style="display:none">
						<c:forEach var="disease" items="${diseaseType.diseases}">
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="searchResultPage.action?sn=${disease.sn }">${disease.name}</a>
							<br />
						</c:forEach>
						<br />
					</div>
				</c:forEach>
				<hr />
			</div>
		</c:forEach>

	</div>
	<div id="container">
		<hr />
		<img alt="" src="img/baolude-logo.gif">
		<hr /><span style="float:right;" id="timer"></span>
		<ul id="tab" class="nav nav-tabs">
			<li class="active"><a id="quickSearch" data-toggle="tab"
				href="#profileQuick">快速检索</a>
			</li>


			<li class=""><a id="advancedSearch" data-toggle="tab"
				href="#profileAdvence">高级检索</a>
			</li>

			<li class=""><a id="searchSampleInfo" data-toggle="tab"
				href="#profileOrder">查询订单</a>
			</li>
		</ul>
		<div id="myTabContent" class="tab-content">

			<!-- -------------------------------------------------快速检索------------------------------------------------- -->
			<div id="profileQuick" class="tab-pane active in">
				<form name="quickForm" action="quickSearch.action">
					<input type="text" name="searchname" id="FirstInput" /><br />
				</form>
				<a id="quickBtn" type="button" class="btn btn-success"
					><i class="icon-search icon-white"></i>&nbsp;&nbsp;&nbsp;&nbsp;快速检索</a>

			</div>
			<!-- ------------------------------------------------高级检索---------------------------------------------- -->
			<div id="profileAdvence" class="tab-pane">
				<form name="anvencedform" action="searchForSQLAnvenced.action"
					method="post">
					<select name="searchtype">
						<option>根据疾病名检索</option>
						<option>根据疾病关键字检索</option>
						<option>根据疾病别名检索</option>
					</select> <input type="text" name="searchname" />
				</form>
				<a id="searchbtnanvanced" class="btn btn-success" type="button"
					><i class="icon-search icon-white"></i>&nbsp;&nbsp;&nbsp;&nbsp;查询</a>
			</div>
			<!-- ------------------------------------------------账单检索---------------------------------------------- -->
			<div id="profileOrder" class="tab-pane">
				<input type="text" name="searchSampleInfoName" /><span id="searchSampleInfoNameForTishi" style="font-size: 12px;color: #999;">可根据时间、病人名、测试项目名称查询</span><br/> <br/> 
				<a class="btn"
					id="searchSampleInfoBtn" type="button"  ><i class="icon-search icon-blue"></i>&nbsp;&nbsp;&nbsp;&nbsp;查询订单</a>
				<c:if test="${not empty totalcount}">

				</c:if>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	function showTimer() {
		var mydate = new Date();
		var text = mydate.toLocaleString();
		var div = document.getElementById("timer");
		div.innerHTML = text;
		setTimeout("showTimer()", 1000);
	}
	window.onload = showTimer();
	$(function(){
		$("#topbarHomepage").addClass("active");
	});
	
	$('#myTab').tab('show');
	$(function(){
		$("input[name='searchSampleInfoName']").click(function(){
			$("#searchSampleInfoNameForTishi").css("display","none");
		});
	});
	$(function() {
		$("#allfolds").click(function() {
			$(".typeanddisease").css("display", "none");
			$(".diseaseCategorySn").text("+");
			$("#allfolds").text(" + ");
		});
	});
	$(function() {
		$(".diseaseCategorySn").each(function() {
			var diseaseCategorySn = $(this).children().val();
			$("#stackFirst" + diseaseCategorySn).toggle(function() {
				$("#stackTwo" + diseaseCategorySn).css("display", "block");
				$("#stackFirst" + diseaseCategorySn).text(" -");
			}, function() {
				$("#stackTwo" + diseaseCategorySn).css("display", "none");
				$("#stackFirst" + diseaseCategorySn).text("+");
			});

		});

		$(".diseaseTypeSn").each(function() {
			var diseaseTypeSn = $(this).children().val();
			$("#stackSecound" + diseaseTypeSn).toggle(function() {
				$("#stackThree" + diseaseTypeSn).css("display", "block");
				$("#stackSecound" + diseaseTypeSn).text(" -");
			}, function() {
				$("#stackThree" + diseaseTypeSn).css("display", "none");
				$("#stackSecound" + diseaseTypeSn).text("+");
			});

		});
		$("#searchbtnstandard").click(function() {
			$("form[name='standardform']").submit();
		});
		$("#searchbtnanvanced").click(function() {
			$("form[name='anvencedform']").submit();
		});
		$("#quickBtn").click(function() {
			$("form[name='quickForm']").submit();
		});
		$("#searchSampleInfoBtn")
				.click(
						function() {
							var searchSampleInfo = $(
									"input[name='searchSampleInfoName']").val();
							window.location.href = "searchSampleInfo.action?searchSampleInfoName="
									+ searchSampleInfo;
						});
	});
	
	$('.dropdown-toggle').dropdown();
</script>
</html>
